package org.ts.wifi;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;

public class TcpSocketServer extends Service {

    private SocketServer serverHelper;

    @Override
    public IBinder onBind(Intent arg0) {
	return null;
    }

    @Override
    public void onCreate() {
	super.onCreate();
	final Context context = getApplicationContext();
	new Thread() {
	    public void run() {
		serverHelper = new SocketServer(context);
	    }
	}.start();
    }

    @Override
    public void onDestroy() {
	super.onDestroy();
	serverHelper.closeServer();
    }

    @Override
    public void onLowMemory() {
	super.onLowMemory();
	serverHelper.closeServer();
    }

    @Override
    public void onStart(Intent intent, int startId) {
	// TODO Auto-generated method stub
	super.onStart(intent, startId);
	//serverHelper = new SocketServer();
    }

}
